package org.dromara.third.auth.common.auth;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


/**
 * @author admin
 * @date 2020/7/13 15:04
 */
@Component
public class InterceptorRegister implements WebMvcConfigurer {

    @Autowired
    private AuthBaseFilter authFilter;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authFilter).addPathPatterns("/api/v1/**").excludePathPatterns("/open/**");
    }

}
